﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="InformePedidos.aspx.cs" Inherits="Forrajeria.Informes" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style3
        {
            width: 124px;
        }
        .style4
        {
            width: 61px;
        }
    .style5
    {
        color: #000000;
    }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="Red" />
     
  
    <asp:Panel ID="panelPedido" runat="server">
    <h3>
    <asp:Label ID="lblPedidos" runat="server" Text="Pedidos"></asp:Label></h3>
        <table class="style1">
            <tr>
                <td class="style4">
                    <asp:Label ID="lblTipoPedido" runat="server" Text="Tipo:" CssClass="style5"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlTipoPedido" runat="server">
                        <asp:ListItem>Cliente</asp:ListItem>
                        <asp:ListItem>Proveedor</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="style3" rowspan="2">
                    <span class="style5">
                    <asp:Label ID="lblFechaRegistrarPedido" runat="server" 
                        Text="Fecha Registracion"></asp:Label>
                    </span>
                </td>
                <td class="style5">
                    <asp:Label ID="lblDesdeRegPedido" runat="server" Text="Desde:"></asp:Label>
                    </span>
                </td>
                <td>
                    <asp:TextBox ID="txtFechaDesdePedido" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style4">
                    <asp:Label ID="lblEstadoPedido" runat="server" Text="Estado:" CssClass="style5"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlEstadoPedido" runat="server">
                        <asp:ListItem Value="A">Pendiente</asp:ListItem>
                        <asp:ListItem Value="B">Autorizado</asp:ListItem>
                        <asp:ListItem Value="C">Facturado</asp:ListItem>
                        <asp:ListItem Value="D">Baja Usuario</asp:ListItem>
                        <asp:ListItem Value="E">Rechazado</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:Label ID="lblHastaRegPedido" runat="server" Text="Hasta:" 
                        CssClass="style5"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtFechaHastaPedido" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style4">
                    <span class="style5"></span></td>
                <td>
                    &nbsp;</td>
                <td class="style3" rowspan="1">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style4">
                    </span></td>
                <td>
                    <asp:Button ID="btnBuscarPedido" runat="server" Text="Buscar Pedidos" 
                        onclick="btnBuscarPedido_Click" />
                </td>
                <td>
                    <span class="style5"></span></td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style4">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    </span></td>
            </tr>
        </table>
       
    </asp:Panel>

      <asp:Panel ID="panelCliente" runat="server">
      
     <div align="center">
            <asp:Label ID="Label1" runat="server" Text="Pedidos"></asp:Label>
        </div>
        <asp:GridView ID="gvPedidoCliente" runat="server"   
            CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%" 
            AutoGenerateColumns="False" 
              onselectedindexchanging="gvPedidoCliente_SelectedIndexChanging">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:BoundField DataField="Id_cliente" HeaderText="ID Cliente"/>
            <asp:BoundField DataField="NroPedido" HeaderText="Numero Pedido"/>
            <asp:BoundField DataField="FechaPedido" HeaderText="Fecha de Pedido"/>
            <asp:BoundField DataField="FechaAuto" HeaderText="Fecha de Autorizacion"/>
            <asp:BoundField DataField="FechaDeseada" HeaderText="Fecha Deseada"/>
            <asp:BoundField DataField="TotalPedido" HeaderText="Total Pedido"/>
            <asp:CommandField ButtonType="Image" CancelText="" InsertText="" NewText="" 
                    SelectText="" UpdateText="" EditText="" 
                    HeaderText="Seleccionar" SelectImageUrl="~/images/selectBusqueda.jpg" 
                    ShowSelectButton="True" />
           
        </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" 
                HorizontalAlign="Center" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#EDEAE4" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
    </asp:GridView>
    <div align="center">
        <asp:Label ID="lblDetCli" runat="server" 
            Text="Detalle:" Visible="False"></asp:Label>
        </div>
    <asp:GridView ID="gvDetPedCliente" runat="server"   
            CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%"
            EnableSortingAndPagingCallbacks="True" DataKeyNames="codigoForraje" 
            AutoGenerateColumns="False" Visible="False">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:BoundField DataField="nombreForraje" HeaderText="Forraje"/>
            <asp:BoundField DataField="nombreMarca" HeaderText="Marca" Visible="false" />
            <asp:BoundField DataField="edadDescripcion" HeaderText="Edad" />
            <asp:BoundField DataField="cantidad" HeaderText="Cantidad" />
            <asp:BoundField DataField="peso" HeaderText="Peso (Kg)" />
            <asp:BoundField DataField="precioKilo" HeaderText="Precio/Kilo" />
            <asp:BoundField DataField="precio" HeaderText="Precio" />
            
            
           
        </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" 
                HorizontalAlign="Center" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#EDEAE4" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
    </asp:GridView>
    </asp:Panel>
    


    <asp:Panel ID="panelProveedor" runat="server">
     <div align="center">
            <asp:Label ID="lblPedidosResultado" runat="server" Text="Pedidos"></asp:Label>
        </div>
        <asp:GridView ID="gvPedidoProveedor" runat="server"   
            CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%" 
            AutoGenerateColumns="False" 
            onselectedindexchanging="gvPedidoProveedor_SelectedIndexChanging">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:BoundField DataField="CodigoProveedor" HeaderText="Codigo Proveedor"/>
            <asp:BoundField DataField="NumeroPedido" HeaderText="Numero Pedido"/>
            <asp:BoundField DataField="FechaPedido" HeaderText="Fecha de Pedido"/>
            <asp:BoundField DataField="FechaDeEntrega" HeaderText="Fecha Entrega"/>
            <asp:BoundField DataField="NroFacturaPedido" HeaderText="Numero Factura"/>
            <asp:CommandField ButtonType="Image" CancelText="" InsertText="" NewText="" 
                    SelectText="" UpdateText="" EditText="" 
                    HeaderText="Seleccionar" SelectImageUrl="~/images/selectBusqueda.jpg" 
                    ShowSelectButton="True" />
           
        </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" 
                HorizontalAlign="Center" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#EDEAE4" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
    </asp:GridView>
    <div align="center">
        <asp:Label ID="lblDetPedidoResu" runat="server" 
            Text="Detalle:" Visible="False"></asp:Label>
        </div>
    <asp:GridView ID="gvDetallePedProveedor" runat="server"   
            CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%"
            EnableSortingAndPagingCallbacks="True" DataKeyNames="codigoForraje" 
            AutoGenerateColumns="False" Visible="False">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:BoundField DataField="nombreForraje" HeaderText="Forraje"/>
            <asp:BoundField DataField="nombreMarca" HeaderText="Marca" Visible="false" />
            <asp:BoundField DataField="edadDescripcion" HeaderText="Edad" />
            <asp:BoundField DataField="cantidad" HeaderText="Cantidad" />
            <asp:BoundField DataField="peso" HeaderText="Peso (Kg)" />
            <asp:BoundField DataField="precioKilo" HeaderText="Precio/Kilo" />
            <asp:BoundField DataField="precio" HeaderText="Precio" />
            
            
           
        </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" 
                HorizontalAlign="Center" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#EDEAE4" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
    </asp:GridView>
    </asp:Panel>
   

</asp:Content>
